public class 冒泡排序 {
    public static void main(String[] args) {
        int[] arr = {12,432,54,32,45};
        for (int i = 0; i < arr.length-2 ; i++) {
            int num =0;
            for (int k = 0; k < arr.length-1; k++) {
                if(arr[k]>arr[k+1]){
                    num =arr[k];
                    arr[k]=arr[k+1];
                    arr[k+1]=num;
                }

            }
        }
        for (int j = 0; j < arr.length; j++) {
            System.out.println(arr[j]);
        }

    }
}
